package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;
import com.luhuiguo.cms.shared.model.ChannelModel;

public class AddArticleEvent extends GwtEvent<AddArticleEventHandler> {

    public static Type<AddArticleEventHandler> TYPE = new Type<AddArticleEventHandler>();

    private final Long channel;

    public AddArticleEvent(Long channel) {
        this.channel = channel;
    }

    public Long getChannel() {
        return channel;
    }

    @Override
    protected void dispatch(AddArticleEventHandler handler) {
        handler.onAddArticle(this);

    }

    @Override
    public Type<AddArticleEventHandler> getAssociatedType() {
        return TYPE;
    }

}
